<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<title>Framekiller</title>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<link href="http://home4j.duapp.com/share/bootstrap/css/bootstrap.min.css" rel="stylesheet">
		<script src="http://home4j.duapp.com/share/jquery/jquery-2.min.js" type="text/javascript"></script>
		<script src="http://home4j.duapp.com/share/syntaxhighlighter/scripts/shCore.js" type="text/javascript"></script>
		<script src="http://home4j.duapp.com/share/syntaxhighlighter/scripts/shBrushJScript.js" type="text/javascript"></script>
		<link href="http://home4j.duapp.com/share/syntaxhighlighter/styles/shCoreDefault.css" rel="stylesheet"/>
		<script src="assets/share.js" type="text/javascript"></script>
		<link href="assets/share.css" rel="stylesheet"/>
		<script>
			setTimeout(function() {
				if (self != top) {
					top.location = self.location;
				}
			}, 4000);
		</script>
	</head>
	<body>
		<div class="container">
			<div class="page-header">
				<h3>Framekiller</h3>
			</div>
			<p>被嵌套的页面，加入防嵌套的逻辑，4秒后将检查当前页面地址和顶级页面地址是否相同，不同则跳转到当前页面。</p>
			<div class="panel panel-warning">
				<div class="panel-heading">
					Code
				</div>
				<div class="panel-body">
					<pre class="brush: js;">
setTimeout(function() {
	if (self != top) {
		top.location = self.location;
	}
}, 4000);
</pre>
				</div>
			</div>
		</div>
	</body>
</html>